<?php
/**
 * 不继承baseController的情况下
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2020/4/24
 * Time: 10:44
 */
namespace app\controller;

use app\Request;

class Lean{

    /*
     * 操作方法注入
     * @param Request $request
     */
    public function index(Request $request){
        //第二种方法获取参数
        $data = $request->param('abc',123);
        echo "<pre>";
        print_r($data);
        echo "</pre>";
        echo "<hr />";
        //第三种方法获取参数
        $data2 = input('abc',456);
        echo "<pre>";
        print_r($data2);
        echo "</pre>";
        echo "<hr />";
        //第四种获取参数的方法
        $data3= request()->param('abc',789);
        echo "<pre>";
        print_r($data3);
        echo "</pre>";
        echo "<hr />";
        //第五中获取方式 门面方式 静态调用
    }

}